

<script type language="text/javascript">
function createRequestObject() {
    window.alert("IN REQUEST");
	var req;
	if(window.XMLHttpRequest){
    // Firefox, Safari, Opera...
    	req = new XMLHttpRequest();
	}
	else if(window.ActiveXObject) {
    	// Internet Explorer 5+
		req = new ActiveXObject("Microsoft.XMLHTTP");
   	}
	else {
    	alert('Problem creating the XMLHttpRequest object');
   	}
   	return req;
}

// Make the XMLHttpRequest object
var http = createRequestObject();

function autoFill() {

window.alert("IN AUTOFILL");
	jsid = document.editARTICLE.selected.value;
	http.open('get', 'plugin/base/cms/article/getarticle.php?varID='+jsid);
   	http.onreadystatechange = function() {
		if(http.readyState == 4 && http.status == 200) {
     		var response = eval("(" + http.responseText + ")");
    		if(response) {
                    alert ('jzjz');


                                document.form.aid.value= response.id;
      		}
		}
	}
   	http.send(null);
}
</script>


